cmake_minimum_required(VERSION 2.6)
PROJECT(imagefeaturedetectorComp)

# Sources set
SET(SOURCES
  imagefeaturedetectorComp.cpp
  imagefeaturedetectorI.cpp
  worker.cpp
  windowImage.cpp
  windowCaptureWebcam.cpp
  windowCaptureRoboComp.cpp
  windowPreferences.cpp
  windowStartup.cpp
  windowFastRealTime.cpp
# $ENV{ROBOCOMP}/Classes/rapplication/rapplication.cpp
# $ENV{ROBOCOMP}/Classes/innermodel/robotinnermodel.cpp
# $ENV{ROBOCOMP}/Classes/innermodel/innermodel/innermodel.cpp
# $ENV{ROBOCOMP}/Classes/innermodel/innermodel/innermodelreader.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qcamera.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qextrinsics.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qmat.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qmatrot.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qmovingrobot.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qvec.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qfundamental.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qessential.cpp
# $ENV{ROBOCOMP}/Classes/qmatriz/qrtmat.cpp
# $ENV{ROBOCOMP}/Classes/qworld/qworld.cpp
)

# Headers set
SET(HEADERS
  imagefeaturedetectorI.h
  worker.h
  windowImage.h
  windowCaptureWebcam.h
  windowCaptureRoboComp.h
  windowPreferences.h
  windowAbout.h
  windowStartup.h
  windowFastRealTime.h
# $ENV{ROBOCOMP}/Classes/innermodel/innermodel/innermodel.h
# $ENV{ROBOCOMP}/Classes/innermodel/innermodel/innermodelreader.h
# $ENV{ROBOCOMP}/Classes/qworld/qworld.h
)

# RoboComp
INCLUDE($ENV{ROBOCOMP}/CMake/robocomp.cmake)
ROBOCOMP_INITIALIZE($ENV{ROBOCOMP}/)
ROBOCOMP_WRAP_ICE(Imagefeaturedetector Camera CommonHead JointMotor DifferentialRobot CamMotion Laser)


SET(EXECUTABLE_OUTPUT_PATH $ENV{ROBOCOMP}/Components/RoboLab/Experimental/imagefeaturedetectorComp/bin)

# IPP and OpenCV
# INCLUDE($ENV{ROBOCOMP}/CMake/ipp.cmake)
INCLUDE($ENV{ROBOCOMP}/CMake/opencv.cmake)

# FrameWave
# INCLUDE($ENV{ROBOCOMP}/CMake/framewave.cmake)

# Qt4
ADD_DEFINITIONS(-Wall -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB)
FIND_PACKAGE(Qt4 REQUIRED)
SET(QT_USE_QTGUI TRUE)
# SET(QT_USE_QTOPENGL TRUE)
SET(QT_USE_QTXML TRUE)
SET(QT_USE_QTGUI TRUE)
INCLUDE(${QT_USE_FILE})
QT4_WRAP_CPP(MOC_SOURCES ${HEADERS})
QT4_WRAP_UI(UI_HEADERS mainWindow.ui)
QT4_WRAP_UI(UI_HEADERS imageWindow.ui)
QT4_WRAP_UI(UI_HEADERS captureWebcamWindow.ui)
QT4_WRAP_UI(UI_HEADERS captureRoboCompWindow.ui)
QT4_WRAP_UI(UI_HEADERS preferencesWindow.ui)
QT4_WRAP_UI(UI_HEADERS aboutWindow.ui)
QT4_WRAP_UI(UI_HEADERS startupWindow.ui)
QT4_WRAP_UI(UI_HEADERS featureHarrisWindow.ui)
QT4_WRAP_UI(UI_HEADERS featureSURFWindow.ui)
QT4_WRAP_UI(UI_HEADERS featureSIFTWindow.ui)
QT4_WRAP_UI(UI_HEADERS featureFASTWindow.ui)
QT4_WRAP_UI(UI_HEADERS fastRealTimeWindow.ui)

# Specify construction and link process
ADD_EXECUTABLE(imagefeaturedetectorComp ${SOURCES} ${MOC_SOURCES} ${RC_SOURCES} ${UI_HEADERS})
TARGET_LINK_LIBRARIES(imagefeaturedetectorComp ${LIBS} ${QT_LIBRARIES})

INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/imagefeaturedetectorComp DESTINATION /opt/robocomp/bin/)